<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateDelayMailTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('delay_mail', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('to');
			$table->text('subject', 65535);
			$table->text('cc', 65535)->nullable();
			$table->text('text');
			$table->timestamp('submit_time')->default(DB::raw('CURRENT_TIMESTAMP'));
			$table->dateTime('last_update')->nullable();
			$table->text('attachments')->nullable();
			$table->timestamps();
			$table->softDeletes();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('delay_mail');
	}

}
